package com.xuecheng.content.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum PublishStatus {
    NOT_PUBLISH("203001", "未发布"),
    PUB("203002", "已发布"),
    DELETE("203003", "下线");

    @EnumValue //该注解表示该字段是枚举值
    private final String code;
    @JsonValue //序列化时返回该字段
    private final String desc;

    PublishStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

}
